package com.shrw.duke.serialport.port;

import com.shrw.duke.serialport.listener.PortDataListener;

import java.io.IOException;

/**
 * Created by rw-duke on 2018/5/21.
 */

public abstract class AbsPort {
    public abstract void initPort();

    public abstract void open() throws IOException;

    public abstract boolean isOpen();

    public abstract void close();

    public abstract void send(String cmd);

    public abstract void send(byte[] cmd);

    public abstract void setReturnData(PortDataListener dataListener);

    public abstract void destroy();
}
